//
//  DestinationCell.m
//  Follow Me
//
//  Created by apple on 2017/4/11.
//  Copyright © 2017年 apple. All rights reserved.
//

#import "DestinationCell.h"
#import "Destinations+CoreDataClass.h"
#import "MoreViewController.h"
@implementation DestinationCell

- (void)awakeFromNib {
    [super awakeFromNib];
       
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)ConfigDestinationCell:(Destinations *)dic;
{
    
//    NSArray *des1 = [destinationInfo subarrayWithRange:NSMakeRange(0,3)];
//    NSArray *des2 = [destinationInfo subarrayWithRange:NSMakeRange(3,3)];
    
    Destinations *destination1 = dic;
//    Destinations *destination2 = dic;
    self.DestinationCellUIImage1.layer.cornerRadius = 12;
    self.DestinationCellUIImage1.layer.masksToBounds = YES;
    
    UIImage *image1 = [UIImage imageWithData:destination1.backgroundPIC];
    NSData *tempImage = UIImageJPEGRepresentation(image1, 0.1);
    UIImage *image1_1 = [UIImage imageWithData:tempImage];
//    UIImage *image2 = [UIImage imageWithData:destination2.backgroundPIC];
    self.DestinationCellUIImage1.image = image1_1;
    self.DestinationCellDestinationNameLabel.text = destination1.destinationName;
//    [self.DestinationCellUIImage1 setBackgroundImage:image1_1 forState:UIControlStateNormal];
//    [self.DestinationCellUIImage2 setImage:image2 forState:UIControlStateNormal];
//    [self.DestinationCellUIImage1 setTitle:destination1.destinationName forState:UIControlStateNormal];
//    [self.DestinationCellUIImage2 setTitle:destination2.destinationName forState:UIControlStateNormal];

}

@end
